package com.naiterui.ehp.bs.b2c.common.remote;

import com.naiterui.ehp.bp.bo.patient.PatientBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomDetailBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.b2c.order.vo.logistics.sf.request.SfTraceQueryRequest;
import com.naiterui.ehp.bs.b2c.order.vo.logistics.sf.response.SfTraceLogs;
import com.naiterui.ehp.bs.b2c.thirdparty.vo.*;

import java.util.List;

/**
 * 远程请求URL
 *
 * @author guoyongxiang
 */
public interface IB2cRemoter {

    /**
     * 医生token校验
     *
     * @param doctorId
     * @param token
     * @return
     * @throws BusinessException
     */
    boolean checkDrToken(String doctorId, String token) throws BusinessException;

    /**
     * 患者token校验
     *
     * @param patientId
     * @param token
     * @return
     * @throws BusinessException
     */
    boolean checkPtToken(String patientId, String token) throws BusinessException;

    /**
     * 获取处方信息
     *
     * @param recomId
     * @return
     */
    MedicationRecomBO getRecomInfo(Long recomId) throws BusinessException;

    /**
     * 批量获取处方信息
     *
     * @param recomId
     * @return
     */
    List<MedicationRecomBO> getRecomInfos(List<Long> recomIds) throws BusinessException;


    /**
     * 获取处方药品
     *
     * @param recomId
     * @return
     */
    List<MedicationRecomDetailBO> getRecomDetail(Long recomId) throws BusinessException;

    /**
     * 获取患者信息
     *
     * @param patientId
     * @return
     */
    PatientBO getPatientInfo(Long patientId) throws BusinessException;

    /**
     * 获取处方流转平台token信息
     *
     * @return
     * @throws BusinessException
     */
    PrescriptionPlatformTokenVO getPrescriptionPlatformToken();

    /**
     * 根据时间范围获取处方流转平台商品列表信息
     *
     * @param start
     * @param end
     * @return
     * @throws BusinessException
     */
    PrescriptionPlatformResponseVO<PrescriptionPlatformProductVO> getPlatformProduct(String accessToken, String start, String end)
        throws BusinessException;

    /**
     * 根据商品编码获取处方流转凭条商品列表信息
     *
     * @param accessToken
     * @param numbers
     * @return
     * @throws BusinessException
     */
    PrescriptionPlatformResponseVO<PrescriptionPlatformProductVO> getPlatformProduct(String accessToken, String numbers) throws BusinessException;

    /**
     * 批量获取商品库存信息
     *
     * @param drugList
     * @return
     * @throws BusinessException
     */
    ProductInventoryResponseVO getProductInventory(String accessToken, List<ProductInventoryParamVO> drugList);

    /**
     * 给处方流转平台同步处方
     *
     * @param platformRecom
     * @return
     */
    PrescriptionPlatformResponseVO synchroPrescriptionPlatformRecom(String accessToken, PlatformRecomVO platformRecom) throws BusinessException;

    /**
     * 取消处方流转平台处方
     *
     * @param recomId
     * @return
     */
    PrescriptionPlatformResponseVO calcelPlatformRecom(String accessToken, Long recomId);

    /**
     * 获取处方流转平台处方单状态
     *
     * @param accessToken
     * @param param
     * @return
     */
    PrescriptionPlatformResponseVO<PrescriptionRecomStatusVO> getPrescriptionStatus(String accessToken, PlatformRecomStatusParamVO param);

    /**
     * 获取处方物流单号(顺丰单直接返回物流信息)
     *
     * @param accessToken
     * @param param
     * @return
     */
    PrescriptionPlatformResponseVO<SfTraceLogs> getLogisticsInfo(String accessToken, SfTraceQueryRequest param);
}
